<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <script src="js/jquery.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <!--<script src="extensions/layer/layer.js"></script>-->
        <script src="js/jquery.movebg.js"></script>

        <!--<link rel="stylesheet" type="text/css" href="css/guid1.css">-->
        <!--<link rel="stylesheet" type="text/css" href="css/guid2.css">-->
        <link rel="stylesheet" type="text/css" href="css/index.css">
        <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
    </head>
    <body>
        <?php
        // put your code here
//        $SortName = array('bubble', 'insertion', 'binaryInsertion', 'twoWayInsertion', 'shell', 'quick', 'selection', 'heap', 'merge', 'radix');
        //添加新的排序,1按格式创建相关C++类,
        //2在sort.cpp中添加,
        //3按格式创建相应php,
        //4require进index,
        //5在index sortClass中添加对象        
        require_once 'header.php';
        require_once 'SourceData.php';
        require_once 'Sort.php';
        require_once 'Bubble.php';
        require_once 'Insertion.php';
        require_once 'BinaryInsertion.php';
        require_once 'TwoWayInsertion.php';
        require_once 'HeapSort.php';
        require_once 'MergeSort.php';
        require_once 'QuickSort.php';     
        require_once 'ShellSort.php';     
        require_once 'SimpleSelectionSort.php';     
        require_once 'RadixSort.php';     
        $SortClass = array($bubble, $insertion, $binaryInsertion, $twoWayInsertion, $heapSort, $mergeSort,$shellSort, $quickSort, $simpleSelectionSort, $radixSort);
        require_once 'CompareResult.php';
        require_once 'table.php';

        ?>
        <script type="text/javascript">
//            layer.config({
//                extend: './extend/layer.ext.js'
//            });

            $(document).ready(function () {

                $("[href $= 'Data']").click(function ()
                {
                    $("#showSourceData").fadeIn("slow");
                });
                $("[href $= 'home']").click(function ()
                {
                    window.location.reload();
                });
<?php
for ($index = 0; $index < 10; $index++)
{
    ?>
                    $("[href = '#<?php echo $SortClass[$index]->realName; ?>ShowResult']").click(function ()
                    {
                        //                   $("[href $= 'Result']").hide();
                        $("div.showResult").fadeOut("slow");
                        $("#showSourceData").fadeIn("slow");
                        $("#<?php echo $SortClass[$index]->realName; ?>ShowResult").fadeIn("slow");
                    });

                    $("[href = '#<?php echo $SortClass[$index]->realName; ?>ResultHidden']").click(function ()
                    {

                        $("#<?php echo $SortClass[$index]->realName; ?>ShowResult").fadeOut("slow");
                    });
    <?php
}
?>
                $("[href = '#sourceResultHidden']").click(function ()
                {
                    $("#showSourceData").fadeOut("slow");
                });
                $("[href = '#hiddenAllResult']").click(function ()
                {
                    $("#showSourceData").fadeOut("slow");
                    $("div.showResult").fadeOut("slow");
                });
            });
        </script>

    </body>
</html>